<?php
namespace api\controllers;

use api\util\AliDingDingUtil;
/**
 * Site controller
 */
class SiteController extends JsonRpcController
{
    public $modelClass = 'common\models\User';

    protected $formatType = 'json';
    /**
     * 钉钉获取成员接口
     * @return array
     */
    public function actionAlimember()
    {
        $ali=new AliDingDingUtil();
        $res=$ali->getAllMember();
        return array("message"=>"success","code"=>0,"res"=>$res);
    }

    /**
     * 签到记录
     * @return array
     */
    public function actionAlirecord()
    {
        $ali=new AliDingDingUtil();
        $res=$ali->getrecordlist();
        return array("message"=>"success","code"=>0,"res"=>$res);
    }

    /**
     * 获取审批实例列表
     * @return array
     */
    public function actionAliprocessinstance()
    {
        $ali=new AliDingDingUtil();
        $res=$ali->getspslist();
        return array("message"=>"success","code"=>0,"res"=>$res);
    }


    /**
     * 默认错误页面
     * @return array
     */
    public function actionError()
    {
        return array("message"=>"404");

    }

}
